package com.icinfo.cloud.provider.punish.ucase.casemain.vo;

import cn.hutool.core.util.StrUtil;
import com.icinfo.cloud.provider.punish.ucase.casemain.model.CaseReasonMainRecord;
import lombok.Data;

/**
 * 案件案由-委托信息
 *
 * @author Junfeng.Chen
 **/
@Data
public class CaseReasonEntrustVo {

    /**
     * 案件案由id
     */
    private String caseReasonId;

    /**
     * 案件id
     */
    private String caseId;

    /**
     * 委托部门编码
     */
    private String clientOrgCode;

    /**
     * 委托部门名称
     */
    private String clientOrgName;

    /**
     * 公安委托事项代码
     */
    private String publicSecurityItemCode;

    public CaseReasonEntrustVo() {
    }

    public CaseReasonEntrustVo(CaseReasonMainRecord record) {
        this.caseReasonId = record.getId();
        this.caseId = record.getCaseId();
        this.clientOrgCode = StrUtil.isBlank(record.getClientDeptCode()) ? record.getClientOrgCode() : record.getClientDeptCode();
        this.clientOrgName = StrUtil.isBlank(record.getClientDeptName()) ? record.getClientOrgName() : record.getClientDeptName();
        this.publicSecurityItemCode = record.getPublicSecurityItemCode();
    }
}
